package com.jsbj.user.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jsbj.base.ResultBean;
import com.jsbj.user.entities.SysProject;
import com.jsbj.user.vo.ProListVo;
import com.jsbj.user.vo.ProStatisticsVo;
import com.jsbj.user.vo.QeProjectVo;
import org.springframework.core.io.Resource;

import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 项目表 服务类
 * </p>
 *
 * @author jsbj
 * @since 2022-03-07
 */
public interface ISysProjectService extends IService<SysProject> {

    List<SysProject> getByUserIdAndTenant(JSONObject object);

    List<SysProject> getProjectInfoByUserId(String userId);

    SysProject getProjectInfoByTenatCode(String tenantCode);

    ProListVo getProjectInfoByUserIdStatusProName(String userId, String status, String proName);

    List<SysProject> getBySystemCode(String systemCode);

    ProStatisticsVo queryProjectStatistics(String tenantCode, String userId);

    List<SysProject> checkExist(String proCode, String proName, String id);

    String getProPrex(String ym);

    Map<String,Object> queryProjectList(String tenantCode, String userId);

    ProStatisticsVo queryProjectStatisticsAlone(String tenantCode, String userId);

    List<Map<String, Object>> selectProjectInfoByMenuCode(String menuCode);

    Page<SysProject> getByUserIdAndTenantByPage(JSONObject object);

    ResultBean<JSONObject> projectAdd(QeProjectVo qeProjectVo) throws ParseException;

    String projectCheck(QeProjectVo qeProjectVo);

    ResultBean<JSONObject> projectEdit(QeProjectVo qeProjectVo) throws ParseException;

    QeProjectVo projectDetail(String id);

    Integer closeProject(String id);

    Integer updateProStatus(String proCode,String status,String userId);

    List<SysProject> getProjectInfoByUserIdAll(String userId, List<String> tenantCodes);

    List<SysProject> getProListByUserIdAndParentCode(String userId, String tenantCode);

    void downloadTemplate(HttpServletResponse response, Resource resource);
}
